package com.liwei.thread.testwaitnotify;

public class MyThreadThree extends Thread {
    Object lock;

    public MyThreadThree(Object o) {
        lock = o;
    }

    public void run() {
        try {
            synchronized (lock) {
                System.out.println("Enter MyThreadThree and wait");
                lock.wait();
                System.out.println("MyThreadThree be notified");
            }
        } catch (InterruptedException e) {
        }
    }
}
